package com.qfedu.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

//添加员工
public class Staff {
    private int id;
    //用户
    private String uNo;

    private String dId;
    //部门名称
    private String dName;
    //名字
    private String name;

    private String sex;
    private String email;
    private String qq;
    private String phone;
    private String heading;

    // 将接收的数据 yyyy-MM-dd hh:mm:ss 转换为 Date  // 转换json 时将 date 转换为 字符串
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 将 util.Date 转化为 字符进行保存
    private Date datetime;

    private  int flag;




    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getuNo() {
        return uNo;
    }

    public void setuNo(String uNo) {
        this.uNo = uNo;
    }

    public String getdId() {
        return dId;
    }

    public void setdId(String dId) {
        this.dId = dId;
    }

    public String getdName() {
        return dName;
    }

    public void setdName(String dName) {
        this.dName = dName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getHeading() {
        return heading;
    }

    public void setHeading(String heading) {
        this.heading = heading;
    }

    public Date getDatetime() {
        return datetime;
    }

    public void setDatetime(Date datetime) {
        this.datetime = datetime;
    }

    public Staff() {
    }

    public Staff(int id, String uNo, String dId, String dName, String name, String sex, String email, String qq, String phone, String heading, Date datetime, int flag) {
        this.id = id;
        this.uNo = uNo;
        this.dId = dId;
        this.dName = dName;
        this.name = name;
        this.sex = sex;
        this.email = email;
        this.qq = qq;
        this.phone = phone;
        this.heading = heading;
        this.datetime = datetime;
        this.flag = flag;
    }

    @Override
    public String toString() {
        return "Staff{" +
                "id=" + id +
                ", uNo='" + uNo + '\'' +
                ", dId='" + dId + '\'' +
                ", dName='" + dName + '\'' +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", email='" + email + '\'' +
                ", qq='" + qq + '\'' +
                ", phone='" + phone + '\'' +
                ", heading='" + heading + '\'' +
                ", datetime=" + datetime +
                ", flag=" + flag +
                '}';
    }
}
